<Select DataSource="@_persons"
        @bind-Value="@_selectedValue"
        LabelName="@nameof(Person.Name)"
        ValueName="@nameof(Person.Value)"
        Placeholder="Select a person"
        DefaultActiveFirstItem="false"
        EnableSearch
        OnBlur="OnBlur"
        OnFocus="OnFocus"
        OnSelectedItemChanged="OnSelectedItemChangedHandler"
        OnSearch="OnSearch">
</Select>
<br /><br />
<p>
    Selected Value: @_selectedValue <br />
    Selected Item Name: @_selectedItem?.Name
</p>

@code
{
    class Person
    {
        public string Value { get; set; }
        public string Name { get; set; }
    }

    List<Person> _persons;
    string _selectedValue;
    Person _selectedItem;

    protected override void OnInitialized()
    {
        _persons = new List<Person>
        {
            new Person { Value = "jack", Name = "Jack" },
            new Person { Value = "lucy", Name = "Lucy" },
            new Person { Value = "tom" , Name = "Tom" }
        };
    }

    private void OnSelectedItemChangedHandler(Person value)
    {
        _selectedItem = value;
        Console.WriteLine($"selected: ${value?.Name}");
    }

	private void OnBlur()
    {
        Console.WriteLine("blur");
    }

    private void OnFocus()
    {
        Console.WriteLine("focus");
    }

    private void OnSearch(string value)
    {
        Console.WriteLine($"search: {value}");
    }
}